# Contributor: Oleg Titov <oleg.titov@gmail.com>
# Maintainer: Oleg Titov <oleg.titov@gmail.com>
pkgname=mynewt-newt
pkgver=1.7.0
_ver=${pkgver//./_}_tag
pkgrel=1
pkgdesc="Apache Newt is a smart build and package management tool for Apache Mynewt Operating System"
url="https://mynewt.apache.org"
arch="x86_64 x86"
license="Apache-2.0"
options="!check" # unreleased test suite in separate repository
depends="git"
makedepends="go"
subpackages="$pkgname-doc"
source="mynewt-newt-$pkgver.tar.gz::https://github.com/apache/mynewt-newt/archive/mynewt_${_ver}.tar.gz"
builddir="$srcdir/mynewt-newt-mynewt_${_ver}"

build() {
	./build.sh
}

package() {
	install -Dm 755 newt/newt "${pkgdir}/usr/bin/newt"

	install -Dm 644 -t "${pkgdir}/usr/share/doc/${pkgname}/" README.md
}

sha512sums="ea3ff490bf1322127a1c7c3b77a6f4289b94d66b7c7bf7ad8e5749ef0da73c7a3afdbf297e1f53a28da2e93f1f31ffa170a5433dc7dff36736a279f8d3e0b5f1  mynewt-newt-1.7.0.tar.gz"
